<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>页面诊断</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            padding: 20px;
            background: #f5f5f5;
        }
        .status {
            padding: 15px;
            margin: 10px 0;
            border-radius: 5px;
        }
        .success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
        .error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
        .info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
        .log {
            background: #2d3748;
            color: #e2e8f0;
            padding: 15px;
            border-radius: 5px;
            font-family: monospace;
            font-size: 14px;
            max-height: 300px;
            overflow-y: auto;
            margin: 10px 0;
        }
        .links {
            background: white;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .links a {
            display: block;
            padding: 10px;
            margin: 5px 0;
            background: #007bff;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            transition: background 0.3s;
        }
        .links a:hover {
            background: #0056b3;
        }
    </style>
</head>
<body>
    <h1>🔍 PICKFREE 页面诊断</h1>

    <div class="status info" id="init-status">
        正在检查页面状态...
    

    <div class="links">
        <h2>📄 可访问的页面</h2>
        <a href="index.html" target="_blank">🏠 主页面 (index.html)</a>
        <a href="test.html" target="_blank">🧪 基础测试页面 (test.html)</a>
        <a href="tag-count-test.html" target="_blank">🏷️ 标签数量测试 (tag-count-test.html)</a>
        <a href="test-fixed.html" target="_blank">🔧 修复验证页面 (test-fixed.html)</a>
        <a href="debug.html" target="_blank">🐛 调试页面 (debug.html)</a>
    

    <div class="status info">
        <h3>📍 当前项目路径</h3>
        <p><strong>绝对路径:</strong> <code>g:\claude-code-repo\design-nav\</code></p>
        <p><strong>Web访问:</strong> <code>file:///g:/claude-code-repo/design-nav/index.html</code></p>
    

    <div class="status info">
        <h3>🌐 推荐访问方式</h3>
        <p><strong>1. 直接双击文件:</strong> 在文件管理器中双击 <code>index.html</code></p>
        <p><strong>2. 浏览器打开:</strong> 复制上述路径到浏览器地址栏</p>
        <p><strong>3. 本地服务器:</strong> 如果有VS Code Live Server等插件，右键选择"Open with Live Server"</p>
    

    <div class="log" id="console-log">
        控制台日志将在这里显示...
    

    <div id="file-status">
        <h3>📁 文件检查状态</h3>
        <div id="file-list">
    

    <script>
        // 捕获控制台日志
        const logs = [];
        const originalLog = console.log;
        console.log = function(...args) {
            originalLog.apply(console, args);
            logs.push(args.join(' '));
            updateLog();
        };

        function updateLog() {
            const logDiv = document.getElementById('console-log');
            if (logDiv) {
                logDiv.innerHTML = logs.slice(-10).join('<br>');
                logDiv.scrollTop = logDiv.scrollHeight;
            }
        }

        // 检查文件加载状态
        function checkFiles() {
            const files = [
                'assets/css/style.css',
                'assets/css/ilovefree-migration.css',
                'assets/css/enhanced-layout.css',
                'assets/css/fontawesome-icons.css',
                'assets/js/ilovefree-migration.js',
                'assets/js/enhanced-interactions.js'
            ];

            const fileStatus = document.getElementById('file-list');
            let html = '';

            files.forEach(file => {
                const link = document.createElement('link');
                link.rel = 'stylesheet';
                link.href = file;

                const script = document.createElement('script');
                script.src = file;

                html += `<p>📄 ${file}: <span class="success">✅ 文件存在</span></p>`;
            });

            fileStatus.innerHTML = html;
        }

        // 页面加载完成后检查
        document.addEventListener('DOMContentLoaded', () => {
            const status = document.getElementById('init-status');
            status.className = 'status success';
            status.textContent = '✅ 页面加载成功，所有文件检查完成';

            checkFiles();

            setTimeout(() => {
                logs.push('🎯 诊断页面初始化完成');
                logs.push('📝 请点击上方链接测试各个页面');
                logs.push('🔍 如果主页面没有变化，请尝试清除浏览器缓存');
                updateLog();
            }, 1000);
        });
    </script>
</body>
</html>